With each new release of a relational database management system (RDBMS) product, the number of tasks that can be performed online without an outage are steadily increasing. Certain tasks still require a small window of exclusive access for their completion. A very busy object may never obtain a window of time during which access to the object can be exclusively assigned to a single process. As a result, tasks such as the ones listed below may never be performed without a scheduled outage window:                Online reorganization of database objects (e.g., tablespace, tables, and indexes)        Online database table changes such as adding a column, deleting a column, and changing a data type        Online parameter changes to database objects        Online rename of a database table, column, or index        Online tablespace type changes        Redefinition of database objects        
Reorganization and redefinition of database objects such as tablespace, tables, and index using reorganization (REORG) and redefinition utilities must be performed routinely for space reclamation (e.g., holes created by DELETEs), to restore data clustering order to improve performance of SQL queries, to enable compression to meet business requirements and many more depending on the database management system (DBMS) and business requirements.
There are known online reorganization and redefinition utilities, which allow read/write activity during the reorganization or redefinition, that offer availability, but that need a small window of exclusive access during which no processes are allowed to the tablespace. A very busy tablespace may never obtain a window of low update activity where access to the tablespace can be completely drained. The threads accessing the table may either have to complete or will have to be terminated for the REORG or redefinition utility to successfully complete. As a result, an opportunity to perform critical reorganizations and redefinitions may never materialize.
Most reorganization (REORG) and redefinition utilities perform their functions in phases. Exclusive access (i.e., an outage phase) is required at the final phase of the operation of the REORG or redefinition utility. In a known approach, the problem of the exclusive access requirement is addressed by deferring the outage phase through parameters on the online REORG or redefinition utility. A facility is provided to dynamically alter the parameters of the utility to allow the REORG utility to enter the outage phase at an optimal time determined by database administrators (DBAs). Limitations of the aforementioned known approach include: (1) manual intervention by the DBAs being required and (2) some busy tablespaces never having an idle period during which an exclusive lock can be manually granted. In another known approach, parameters are provided to unconditionally force out the processes accessing the tablespace and database objects before the REORG or redefinition utility enters the outage phase, thereby allowing the utility to complete its operation. The forcefully terminated processes can cause potential issues with an application and is never a preferred method and therefore is not allowed by the owners of the application. As a result of using the known approaches, the online REORG or redefinition activities fail to acquire an exclusive lock on the object and therefore fail. Similar problems arise for the other online tasks listed above. Accordingly, there is a need for a technique to ensure successful completion of the aforementioned tasks that require a small window of exclusive access.